<template>
    <el-table ref="multipleTableRef" :data="tableData" row-key="id" style="width: 100%">
        <el-table-column label="Date" width="120">
            <template #default="scope">
                {{ row.type ? (row.type == 1 ? '是' : '否') : '' }}
            </template>
        </el-table-column>
        <el-table-column property="name" label="Name" width="120" />
        <el-table-column property="address" label="Address" show-overflow-tooltip />
        <el-table-column property="imgurl" label="图片" show-overflow-tooltip>
            <template #default="scope">
                <el-image :src="scope.row.imgurl" style="width: 100px; height: 100px" :zoom-rate="1.2" :max-scale="7"
                    :min-scale="0.2" :preview-src-list="[scope.row.imgurl]" show-progress fit="cover"
                    preview-teleported="true" :scale="0.5" class="preview-image" />
            </template>
        </el-table-column>
    </el-table>
</template>

<script setup>
import { ref } from 'vue'
const tableData = [
    {
        id: 1,
        date: '2016-05-03',
        name: 'Tom',
        address: 'No. 189, Grove St, Los Angeles',
        imgurl: 'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg',
    },
    {
        id: 2,
        date: '2016-05-02',
        name: 'Tom',
        address: 'No. 189, Grove St, Los Angeles',
        imgurl: 'https://fuss10.elemecdn.com/1/34/19aa98b1fcb2781c4fba33d850549jpeg.jpeg',
    },
    {
        id: 3,
        date: '2016-05-04',
        name: 'Tom',
        address: 'No. 189, Grove St, Los Angeles',
        imgurl: 'https://fuss10.elemecdn.com/0/6f/e35ff375812e6b0020b6b4e8f9583jpeg.jpeg',
    },
    {
        id: 4,
        date: '2016-05-01',
        name: 'Tom',
        address: 'No. 189, Grove St, Los Angeles',
        imgurl: 'https://fuss10.elemecdn.com/9/bb/e27858e973f5d7d3904835f46abbdjpeg.jpeg',
    },
]
</script>
<style>
.el-image-viewer__mask {
    /* width: 80%;
    height: 80% */
}
</style>